package dq.jvm;

/**
 * @Author: Dang Qi
 * @Date: 2021/3/2  20:23
 * @Description:
 */
public class TestDoublePlus {
    public static void one(){
        //第一类
        int i1 = 10;
        i1++;

        int i2 = 10;
        ++i2;
    }
    public static void two(){
        //第二类
        int i3 = 10;
        int i4 = i3++;

        int i5 = 10;
        int i6 = ++i5;
    }
    public static void three(){
        //第三类
        int i7 = 10;
        i7 = i7++; //还是10

        int i8 = 10;
        i8 = ++i8; //11
//        System.out.println(i7 + " " + i8);
    }
    public static void four(){
        //第四类
        int i9 = 10;
        int i10 = i9++ + ++i9;//22
    }
    public static void main(String[] args) {
        one();
        two();
        three();
        four();
    }
}
